//
//  UIView+Additional.swift
//  SeaTransportManage
//
//  Created by guopengwen on 2021/11/26.
//

import Foundation
import UIKit

extension UIView {
    func setCorndersRaduis(raduis: CGFloat, roundingCorners: UIRectCorner) {
        let maskPath = UIBezierPath(roundedRect: self.bounds, byRoundingCorners: roundingCorners, cornerRadii: CGSize(width: raduis, height: raduis))
        let maskLayer = CAShapeLayer()
        maskLayer.frame = self.bounds
        maskLayer.path = maskPath.cgPath
        maskLayer.shouldRasterize = true
        maskLayer.rasterizationScale = UIScreen.main.scale
        self.layer.mask = maskLayer
    }
}
